1.) Field of the Invention
The present invention relates to a bar-code reader, a method of reading a bar code and a computer program for accurately reading a bar code based on optical power of light reflected from the bar code, even when black bars in the bar code are thicker or thinner than a basic width.
2.) Description of the Related Art
Products are managed by providing a bar code to the product and identifying the product by reading this bar code optically. Bar code labels can be prepared at a low cost by printing etc. Therefore, using such bat code labels, it is possible to reduce management cost substantially.
The bar-code labels attached to the products are read using a bar code reader. Such a bar code reader generally includes an optical system like a laser reader, a charged coupled device (CCD) camera etc. The bar code reader receives light that is reflected from the bar code label, determines a pattern of the white bars and the black bars in the bar code from the optical power of the light reflected, and then decodes this pattern to obtain character data that is a pattern of numerals and characters. Such a bar code reader has been disclosed in, for example, Japanese Patent Application Laid-open Application No. 2001-19271.
Therefore, to read a bar code accurately, it is extremely important to compute an array of bar code accurately from the optical power of the reflected light. Various conventional devices to accurately compute an array of a bar code are available.
For example, in a bar-code reader disclosed in Japanese Patent Application Laid-open Publication No. Hei 55-143682, a waveform that indicates an optical power of reflected light is differentiated and then divided into a waveform on a positive side and a waveform on a negative side. A boundary from a black bar to a white bar of a bar code is detected from the waveform on the positive side and a boundary from a white bar to a black bar of a bar code is detected from the waveform on the negative side. This realizes stable reading of the bar code in spite of variation in frequency of the bar code and variation in the amount of light.
The width of black bars and white bars in the bar code has to be in multiples of a basic unit width. When a bar code is read, number of times each black bar and white bar is of this basic unit width is read. But there are cases where the width of each black bar and white bar does not conform to the basic unit width.
For example, due to spreading of ink while printing a bar code, the black bars in the bar code become broader than the desired width. Moreover, the bar code gets blurred from when the bar code is printed until the bar code is really read, so that the width of the black bars becomes narrow than the desired width.
When there is a thickening or thinning of the black bars, the width of black bars and white bars deviates from true multiples of the basic unit width, thereby causing decline in accuracy of reading of the bar code.
However, in a conventional bar-code reader, emphasis has been laid only on accurate reproducing of a bar code array. This has resulted in reproduction of thick or thin bars of the bar code whenever they existed and therefore, the bar code cannot be read accurately.